{extend name="common/default" /}
{block name="style"}
<style>
    .page__bd{
        padding:0;
    }
    .weui-tab__panel{
        padding: 16px;
    }
    .weui-bar__item_on img{
        position: relative;
        left: -10000px;
        filter: drop-shadow(10000px 0 0 #07c160);
        overflow: hidden;
    }
    .avatar{
        border-radius: 50%;
        width: 40%;
        max-width: 150px;
        max-height: 150px;
        margin: auto;
    }
    .points{
        color: red;
        font-weight: bolder;
    }
</style>
{/block}

{block name="container"}
<div class="container">
    <div class="page js_show">
        <div class="page__bd page__bd_spacing" style="height: 100%;">
            <div class="weui-tab">
                <div class="weui-tab__panel">
                    <div class="rexam-link" style="text-align: center;" data-url="{:addon_url('rexam/group/index')}">
                        <img class="avatar" src="{$me.sysuser.avatar|cdnurl}"/>
                        <h1>{$me.name}</h1>
                        <p>{$me.rexamgroup.name}</p>
                        <h2 style="color: red;">{$me.points}</h2>
                        <a href="{:addon_url('rexam/user/logout')}" class="weui-btn weui-btn_primary weui-btn_se">退出</a>
                    </div>
                    <div class="weui-panel weui-panel_access">
                        <div class="weui-panel__hd">我参与的答题({$answer_list|count})</div>
                        <div class="weui-panel__bd">
                            {volist name="answer_list" id="vo"}
                            <a href="{:addon_url('rexam/rexam/index',['id'=>$vo['rexam_id']])}" class="weui-media-box weui-media-box_appmsg">
                                <div class="weui-media-box__hd">
                                    <img class="weui-media-box__thumb" src="{$vo.rexam.headfile|cdnurl}" alt="">
                                    {if condition="$vo.rexam.anadata eq 1"}
                                    <span class="weui-badge weui-badge_dot" style="position: absolute; top: 12px; margin-left: -6px;"></span>
                                    {/if}
                                </div>
                                <div class="weui-media-box__bd" style="flex: 3;">
                                    <h4 class="weui-media-box__title">{$vo.rexam.name}</h4>
                                    <p class="weui-media-box__desc">{$vo.right_count}/{$vo.question_count}</p>
                                </div>
                                <div class="weui-media-box__bd"><div class="points">{$vo.points|default=''}</div></div>
                            </a>
                            {/volist}
                        </div>
                    </div>
                </div>
                <div class="weui-tabbar">
                    <div class="weui-tabbar__item" data-url="{:addon_url('rexam/index/index')}">
                        <div style="display: inline-block; position: relative;">
                            <img src="__ADDON__/home.svg" alt="" class="weui-tabbar__icon">
                        </div>
                        <p class="weui-tabbar__label">答题</p>
                    </div>
                    <div class="weui-tabbar__item" data-url="{:addon_url('rexam/index/ranking')}">
                        <img src="__ADDON__/ranking.svg" alt="" class="weui-tabbar__icon">
                        <p class="weui-tabbar__label">排行榜</p>
                    </div>
                    <div class="weui-tabbar__item weui-bar__item_on" data-url="{:addon_url('rexam/index/me')}">
                        <img src="__ADDON__/me.svg" alt="" class="weui-tabbar__icon">
                        <p class="weui-tabbar__label">我</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="javascript"}

{/block}
